$hidden   Importing GEMPACK solution to GDX file

execute 'sltoht -sti sltoht.sti';

execute 'har2gdx govt.sol gem_sol.gdx';

scalars
          c_p
          g_p
          pc_p
          pg_p
          ra_p
          gov_p
;

parameters
          y_p(s)
          p_p(s)
          pf_p(f)
;

execute_load        'gem_sol',
                    y_p=y,
                    c_p=c,
                    g_p=g,
                    p_p=p,
                    pc_p=pc,
                    pg_p=pg,
                    pf_p=pf,
                    ra_p=ra,
                    gov_p=gov,
                    t_x,
                    t_y;

* Recovering level solution

y.l(s) = y_p(s)/100 + 1;
c.l = c_p/100 + 1;
g.l = g_p/100 + 1;
p.l(s) = p_p(s)/100 + 1;
pc.l = pc_p/100 + 1;
pg.l = pg_p/100 + 1;
pf.l(f) = pf_p(f)/100 + 1;

ra.fx = (ra_p/100 + 1) * ra.l;
gov.l = (gov_p/100 + 1) * gov.l;

t_x(s) = abs((t_x(s)/100 + 1) * t_x_l(s) - 1);
t_y(s) = abs((t_y(s)/100 + 1) * t_y_l(s) - 1);

execute_unload 'sol_gem', y, c, g, p, pc, pg, pf, ra, gov, t_x, t_y;
